<template>
  <view>
    <view>
      <!-- 提示信息弹窗 -->
      <uni-popup ref="message" type="message">
        <uni-popup-message :type="msgType" :message="messageText" :duration="2000"></uni-popup-message>
      </uni-popup>
    </view>
    <view>
      <button @click="open">open</button>
    </view>
  </view>
</template>

<script>
import { uniPopup, uniPopupMessage } from '@dcloudio/uni-ui';

export default {
  components: {
    uniPopup, uniPopupMessage
  },
  data() {
    return {
      type: 'center',
      msgType: 'success',
      messageText: '这是一条成功提示',
      value: ''
    }
  },
  methods:{
    change(e) {
      console.log('当前模式：' + e.type + ',状态：' + e.show);
    },
    open(){
      this.$refs.message.open('top');
    }
  },
  onLoad(options) {
  }
}
</script>

<style scoped>

</style>
